package archive

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type ArchiveLocationRouter struct {
}

// InitArchiveLocationRouter 初始化 档案存放位置 路由信息
func (s *ArchiveLocationRouter) InitArchiveLocationRouter(Router *gin.RouterGroup,PublicRouter *gin.RouterGroup) {
	archiveLocationRouter := Router.Group("archiveLocation").Use(middleware.OperationRecord())
	archiveLocationRouterWithoutRecord := Router.Group("archiveLocation")
	archiveLocationRouterWithoutAuth := PublicRouter.Group("archiveLocation")

	var archiveLocationApi = v1.ApiGroupApp.ArchiveApiGroup.ArchiveLocationApi
	{
		archiveLocationRouter.POST("createArchiveLocation", archiveLocationApi.CreateArchiveLocation)   // 新建档案存放位置
		archiveLocationRouter.DELETE("deleteArchiveLocation", archiveLocationApi.DeleteArchiveLocation) // 删除档案存放位置
		archiveLocationRouter.DELETE("deleteArchiveLocationByIds", archiveLocationApi.DeleteArchiveLocationByIds) // 批量删除档案存放位置
		archiveLocationRouter.PUT("updateArchiveLocation", archiveLocationApi.UpdateArchiveLocation)    // 更新档案存放位置
	}
	{
		archiveLocationRouterWithoutRecord.GET("findArchiveLocation", archiveLocationApi.FindArchiveLocation)        // 根据ID获取档案存放位置
		archiveLocationRouterWithoutRecord.GET("getArchiveLocationList", archiveLocationApi.GetArchiveLocationList)  // 获取档案存放位置列表
	}
	{
	    archiveLocationRouterWithoutAuth.GET("getArchiveLocationPublic", archiveLocationApi.GetArchiveLocationPublic)  // 获取档案存放位置列表
	}
}
